package com.hyxt.boot;

import com.hyxt.DTO.RedisListenerApplication;
import com.hyxt.DTO.StartTermianalServer;
import com.hyxt.DTO.T809ManagerListener;
import com.hyxt.DTO.TermianalManagerListener;
import com.hyxt.dao.RedisServiceDAO;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;


@SpringBootApplication
//@EnableAutoConfiguration(exclude = {
//        org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class
//})
public class ApiStart {
    public static void main(String[] args) {
        // 程序启动入口
        // 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件
        ConfigurableApplicationContext run =  SpringApplication.run(ApiStart.class,args);
        //启动监听
        RedisListenerApplication redisListenerApplication = run.getBean(RedisListenerApplication.class);
        redisListenerApplication.startListener();
        StartTermianalServer startTermianalServer = run.getBean(StartTermianalServer.class);
        startTermianalServer.start();
//        TermianalManagerListener termianalManagerListener = run.getBean(TermianalManagerListener.class);
//        termianalManagerListener.onMessage("11","11");

//        T809ManagerListener t809ManagerListener = run.getBean(T809ManagerListener.class);
//        t809ManagerListener.onMessage("","");
    }
}